package com.ruoyi.xyq.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.xyq.mapper.DetailsMapper;
import com.ruoyi.xyq.domain.Details;
import com.ruoyi.xyq.service.IDetailsService;

/**
 * 收支记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-19
 */
@Service
public class DetailsServiceImpl implements IDetailsService 
{
    @Autowired
    private DetailsMapper detailsMapper;

    /**
     * 查询收支记录
     * 
     * @param id 收支记录主键
     * @return 收支记录
     */
    @Override
    public Details selectDetailsById(Long id)
    {
        return detailsMapper.selectDetailsById(id);
    }

    /**
     * 查询收支记录列表
     * 
     * @param details 收支记录
     * @return 收支记录
     */
    @Override
    public List<Details> selectDetailsList(Details details)
    {
        return detailsMapper.selectDetailsList(details);
    }

    /**
     * 新增收支记录
     * 
     * @param details 收支记录
     * @return 结果
     */
    @Override
    public int insertDetails(Details details)
    {
        return detailsMapper.insertDetails(details);
    }

    /**
     * 修改收支记录
     * 
     * @param details 收支记录
     * @return 结果
     */
    @Override
    public int updateDetails(Details details)
    {
        return detailsMapper.updateDetails(details);
    }

    /**
     * 批量删除收支记录
     * 
     * @param ids 需要删除的收支记录主键
     * @return 结果
     */
    @Override
    public int deleteDetailsByIds(Long[] ids)
    {
        return detailsMapper.deleteDetailsByIds(ids);
    }

    /**
     * 删除收支记录信息
     * 
     * @param id 收支记录主键
     * @return 结果
     */
    @Override
    public int deleteDetailsById(Long id)
    {
        return detailsMapper.deleteDetailsById(id);
    }
}
